package bma.common.langutil.jdbc;

/**
 * 
 * @author guanzhong
 * @since 1.0 (imported from BMA.ESP Project)
 * 
 */
public class FieldValue extends Field {

	private static final long serialVersionUID = 3618701915697723192L;

	private String exp;

	private Object value;

	public FieldValue(String name, Object type, Object value) {
		this(name, type, value, null);
	}

	public FieldValue(String name, Object type, Object value, String exp) {
		super(name, type);
		this.value = value;
		this.exp = exp;
	}

	public Object getValue() {
		return value;
	}

	public String getExp() {
		return exp;
	}

	public String getString() {
		return value == null ? "null" : value.toString();
	}

	public String toString() {
		String s = "name:" + getName() + " " + "type:" + getType() + " "
				+ "value:" + value + "("
				+ (value != null ? value.getClass().toString() : "") + ")";
		return s;
	}

}
